/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-12-10 19:57:13
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2025-05-22 16:58:52
 * @FilePath: /vue-element-admin/src/api/customerInformation.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

/*
* 客户
*  */


// export function getReightRangeList(query) {
//   return request({
//     url: '/retailWeightCost/list',
//     method: 'get',
//     params: query
//   })
// }

// export function getCineraryUrnList(query) {
//   return request({
//     url: '/retailAshUrn/list',
//     method: 'get',
//     params: query
//   })
// }


// export function getServiceSchemeList(query) {
//   return request({
//     url: '/retailPlan//list',
//     method: 'get',
//     params: query


//   })
// }

// export function getproductList(query) {
//   return request({
//     url: '/retailProduct/list',
//     method: 'get',
//     params: query
//   })
// }


// export const retailCustomerListQuery = (params) => {
//   return request({
//     url: `/retailCustomer/listQuery?pageNum=${params.pageNum ? params.pageNum : 1}&pageSize=${params.pageSize ? params.pageSize : 10}&id=${params.id ? params.id : ''}&name=${params.name ? params.name : ''}&phone=${params.phone ? params.phone : ''}&petVariety=${params.petVariety ? params.petVariety : ''}&petName=${params.petName ? params.petName : ''}&productId=${params.productId ? params.productId : ''}&channel=${params.channel ? params.channel : ''}&servicePlanName=${params.servicePlanName ? params.servicePlanName : ''}`,
//     method: 'get'
//   })
// }

// export const retailCustomerList = (params) => {
//   return request({
//     url: `/retailCustomer/list?id=${params.id ? params.id : ''}&name=${params.name ? params.name : ''}&phone=${params.phone ? params.phone : ''}&petVariety=${params.petVariety ? params.petVariety : ''}&petName=${params.petName ? params.petName : ''}&productId=${params.productId ? params.productId : ''}&channel=${params.channel ? params.channel : ''}&servicePlanName=${params.servicePlanName ? params.servicePlanName : ''}`,
//     method: 'get'
//   })
// }

// export const retailCustomerGetEntityById = (id) => {
//   return request({
//     url: `/retailCustomer/getEntityById/${id}`,
//     method: 'get'
//   })
// }
// export const retailCustomerAdd = (data) => {
//   return request({
//     url: '/retailCustomer/add',
//     method: 'post',
//     data
//   })
// }

// export const retailCustomerUpdate = (data) => {
//   return request({
//     url: '/retailCustomer/update',
//     method: 'put',
//     data
//   })
// }

// export const retailCustomerRemove = (id) => {
//   return request({
//     url: `/retailCustomer/delete?id=${id}`,
//     method: 'delete'
//   })
// }

// // 导出
// export const exportExcel = (params) => {
//   return request({
//     url: `/retailCustomer/exportExcel?pageNum=${params.pageNum ? params.pageNum : 1}&pageSize=${params.pageSize ? params.pageSize : 10}&id=${params.id ? params.id : ''}&name=${params.name ? params.name : ''}&phone=${params.phone ? params.phone : ''}&petVariety=${params.petVariety ? params.petVariety : ''}&petName=${params.petName ? params.petName : ''}&productId=${params.productId ? params.productId : ''}&channel=${params.channel ? params.channel : ''}&servicePlanName=${params.servicePlanName ? params.servicePlanName : ''}`,
//     method: 'get',
//     responseType: 'blob'
//   })
// }



export function invalidApi( data) {
  return request({
    url: `/retailCustomer/invalidRecover?id=${data}`,
    method: 'put',
    // data
  })
}

export function getListQuery(query) {
  return request({
    // url: '/retailCustomer/listQueryCustomer',
    url: '/retailCustomer/listQuery',
    method: 'get',
    params: query


  })
}


export function getList(query) {
  return request({
    url: '/retailCustomer/list',
    method: 'get',
    params: query


  })
}

export function create(data) {
  return request({
    url: '/retailCustomer/add',
    method: 'post',
    data
  })
}

export function update( data) {
  return request({
    url: `/retailCustomer/update`,
    method: 'put',
    data
  })
}

export function deleteData(id) {
  return request({
    url: `/retailCustomer/delete/?id=${id}`,
    method: 'delete'
  })
}

